filechooserdialog: Stop using gtk_window_get_position()
authorTimm Bäder <mail@baedert.org>
Fri, 19 Jul 2019 07:54:14 +0000 (09:54 +0200)
committerTimm Bäder <mail@baedert.org>
Fri, 19 Jul 2019 16:14:49 +0000 (18:14 +0200)
gtk/gtkfilechooserdialog.c

index 40e19c8a872e6afc92792ca30126335d25ff8b60..2ce649e2588ad480064a907db352d332322b9bed 100644 (file)
@@ -582,20 +582,15 @@ save_dialog_geometry (GtkFileChooserDialog *dialog)
 {
   GtkWindow *window;
   GSettings *settings;
-  int old_x, old_y, old_width, old_height;
-  int x, y, width, height;
+  int old_width, old_height;
+  int width, height;
 
   settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (dialog));
 
   window = GTK_WINDOW (dialog);
 
-  gtk_window_get_position (window, &x, &y);
   gtk_window_get_size (window, &width, &height);
 
-  g_settings_get (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", &old_x, &old_y);
-  if (old_x != x || old_y != y)
-    g_settings_set (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", x, y);
-
   g_settings_get (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", &old_width, &old_height);
   if (old_width != width || old_height != height)
     g_settings_set (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", width, height);